Optimal. Leaf size=215 \[ -\frac {(2 a c+(4 b c+a e) x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{4 c x^2 (a+b x)}+\frac {b \sqrt {d} \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {e+2 d x}{2 \sqrt {d} \sqrt {c+e x+d x^2}}\right )}{a+b x}-\frac {\left (4 a c d+4 b c e-a e^2\right ) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+e x+d x^2}}\right )}{8 c^{3/2} (a+b x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {1014, 824, 857,
635, 212, 738} \begin {gather*} -\frac {\sqrt {a^2+2 a b x+b^2 x^2} \left (4 a c d-a e^2+4 b c e\right ) \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+d x^2+e x}}\right )}{8 c^{3/2} (a+b x)}-\frac {\sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+d x^2+e x} (x (a e+4 b c)+2 a c)}{4 c x^2 (a+b x)}+\frac {b \sqrt {d} \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {2 d x+e}{2 \sqrt {d} \sqrt {c+d x^2+e x}}\right )}{a+b x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 824
Rule 857
Rule 1014
Rubi steps
\begin {align*} \int \frac {\sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x^3} \, dx &=\frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \frac {\left (2 a b+2 b^2 x\right ) \sqrt {c+e x+d x^2}}{x^3} \, dx}{2 a b+2 b^2 x}\\ &=-\frac {(2 a c+(4 b c+a e) x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{4 c x^2 (a+b x)}-\frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \frac {-b \left (4 b c e+a \left (4 c d-e^2\right )\right )-8 b^2 c d x}{x \sqrt {c+e x+d x^2}} \, dx}{4 c \left (2 a b+2 b^2 x\right )}\\ &=-\frac {(2 a c+(4 b c+a e) x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{4 c x^2 (a+b x)}+\frac {\left (2 b^2 d \sqrt {a^2+2 a b x+b^2 x^2}\right ) \int \frac {1}{\sqrt {c+e x+d x^2}} \, dx}{2 a b+2 b^2 x}+\frac {\left (b \left (4 a c d+4 b c e-a e^2\right ) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \int \frac {1}{x \sqrt {c+e x+d x^2}} \, dx}{4 c \left (2 a b+2 b^2 x\right )}\\ &=-\frac {(2 a c+(4 b c+a e) x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{4 c x^2 (a+b x)}+\frac {\left (4 b^2 d \sqrt {a^2+2 a b x+b^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{4 d-x^2} \, dx,x,\frac {e+2 d x}{\sqrt {c+e x+d x^2}}\right )}{2 a b+2 b^2 x}-\frac {\left (b \left (4 a c d+4 b c e-a e^2\right ) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {2 c+e x}{\sqrt {c+e x+d x^2}}\right )}{2 c \left (2 a b+2 b^2 x\right )}\\ &=-\frac {(2 a c+(4 b c+a e) x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{4 c x^2 (a+b x)}+\frac {b \sqrt {d} \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {e+2 d x}{2 \sqrt {d} \sqrt {c+e x+d x^2}}\right )}{a+b x}-\frac {\left (4 a c d+4 b c e-a e^2\right ) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+e x+d x^2}}\right )}{8 c^{3/2} (a+b x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.60, size = 155, normalized size = 0.72 \begin {gather*} -\frac {\sqrt {(a+b x)^2} \left (\left (4 a c d+4 b c e-a e^2\right ) x^2 \tanh ^{-1}\left (\frac {-\sqrt {d} x+\sqrt {c+x (e+d x)}}{\sqrt {c}}\right )+\sqrt {c} \left ((2 a c+4 b c x+a e x) \sqrt {c+x (e+d x)}+4 b c \sqrt {d} x^2 \log \left (e+2 d x-2 \sqrt {d} \sqrt {c+x (e+d x)}\right )\right )\right )}{4 c^{3/2} x^2 (a+b x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.12, size = 359, normalized size = 1.67
method | result | size |
risch | \(-\frac {\sqrt {d \,x^{2}+e x +c}\, \left (a e x +4 b c x +2 a c \right ) \sqrt {\left (b x +a \right )^{2}}}{4 x^{2} c \left (b x +a \right )}+\frac {\left (b \sqrt {d}\, \ln \left (\frac {\frac {e}{2}+d x}{\sqrt {d}}+\sqrt {d \,x^{2}+e x +c}\right )-\frac {\ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a d}{2 \sqrt {c}}+\frac {\ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a \,e^{2}}{8 c^{\frac {3}{2}}}-\frac {\ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) b e}{2 \sqrt {c}}\right ) \sqrt {\left (b x +a \right )^{2}}}{b x +a}\) | \(210\) |
default | \(-\frac {\mathrm {csgn}\left (b x +a \right ) \left (4 d^{\frac {5}{2}} c^{\frac {3}{2}} \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a \,x^{2}+2 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {5}{2}} a e \,x^{3}-8 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {5}{2}} b c \,x^{3}+4 d^{\frac {3}{2}} c^{\frac {3}{2}} \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) b e \,x^{2}-4 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {5}{2}} a c \,x^{2}-d^{\frac {3}{2}} \sqrt {c}\, \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a \,e^{2} x^{2}-2 \left (d \,x^{2}+e x +c \right )^{\frac {3}{2}} d^{\frac {3}{2}} a e x +8 \left (d \,x^{2}+e x +c \right )^{\frac {3}{2}} d^{\frac {3}{2}} b c x +2 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {3}{2}} a \,e^{2} x^{2}-8 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {3}{2}} b c e \,x^{2}+4 \left (d \,x^{2}+e x +c \right )^{\frac {3}{2}} d^{\frac {3}{2}} a c -8 \ln \left (\frac {2 \sqrt {d \,x^{2}+e x +c}\, \sqrt {d}+2 d x +e}{2 \sqrt {d}}\right ) b \,c^{2} d^{2} x^{2}\right )}{8 c^{2} x^{2} d^{\frac {3}{2}}}\) | \(359\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.61, size = 745, normalized size = 3.47 \begin {gather*} \left [\frac {8 \, b c^{2} \sqrt {d} x^{2} \log \left (8 \, d^{2} x^{2} + 8 \, d x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {d} + 4 \, c d + e^{2}\right ) - {\left (4 \, a c d x^{2} + 4 \, b c x^{2} e - a x^{2} e^{2}\right )} \sqrt {c} \log \left (\frac {4 \, c d x^{2} + x^{2} e^{2} + 8 \, c x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {c} + 8 \, c^{2}}{x^{2}}\right ) - 4 \, {\left (4 \, b c^{2} x + a c x e + 2 \, a c^{2}\right )} \sqrt {d x^{2} + x e + c}}{16 \, c^{2} x^{2}}, -\frac {16 \, b c^{2} \sqrt {-d} x^{2} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {-d}}{2 \, {\left (d^{2} x^{2} + d x e + c d\right )}}\right ) + {\left (4 \, a c d x^{2} + 4 \, b c x^{2} e - a x^{2} e^{2}\right )} \sqrt {c} \log \left (\frac {4 \, c d x^{2} + x^{2} e^{2} + 8 \, c x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {c} + 8 \, c^{2}}{x^{2}}\right ) + 4 \, {\left (4 \, b c^{2} x + a c x e + 2 \, a c^{2}\right )} \sqrt {d x^{2} + x e + c}}{16 \, c^{2} x^{2}}, \frac {4 \, b c^{2} \sqrt {d} x^{2} \log \left (8 \, d^{2} x^{2} + 8 \, d x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {d} + 4 \, c d + e^{2}\right ) + {\left (4 \, a c d x^{2} + 4 \, b c x^{2} e - a x^{2} e^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {-c}}{2 \, {\left (c d x^{2} + c x e + c^{2}\right )}}\right ) - 2 \, {\left (4 \, b c^{2} x + a c x e + 2 \, a c^{2}\right )} \sqrt {d x^{2} + x e + c}}{8 \, c^{2} x^{2}}, -\frac {8 \, b c^{2} \sqrt {-d} x^{2} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {-d}}{2 \, {\left (d^{2} x^{2} + d x e + c d\right )}}\right ) - {\left (4 \, a c d x^{2} + 4 \, b c x^{2} e - a x^{2} e^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {-c}}{2 \, {\left (c d x^{2} + c x e + c^{2}\right )}}\right ) + 2 \, {\left (4 \, b c^{2} x + a c x e + 2 \, a c^{2}\right )} \sqrt {d x^{2} + x e + c}}{8 \, c^{2} x^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {c + d x^{2} + e x} \sqrt {\left (a + b x\right )^{2}}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 450 vs.
\(2 (166) = 332\).
time = 5.10, size = 450, normalized size = 2.09 \begin {gather*} -b \sqrt {d} \log \left ({\left | -2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )} d - \sqrt {d} e \right |}\right ) \mathrm {sgn}\left (b x + a\right ) + \frac {{\left (4 \, a c d \mathrm {sgn}\left (b x + a\right ) + 4 \, b c e \mathrm {sgn}\left (b x + a\right ) - a e^{2} \mathrm {sgn}\left (b x + a\right )\right )} \arctan \left (-\frac {\sqrt {d} x - \sqrt {d x^{2} + x e + c}}{\sqrt {-c}}\right )}{4 \, \sqrt {-c} c} + \frac {4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{3} a c d \mathrm {sgn}\left (b x + a\right ) + 4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{3} b c e \mathrm {sgn}\left (b x + a\right ) + 8 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{2} b c^{2} \sqrt {d} \mathrm {sgn}\left (b x + a\right ) + 8 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{2} a c \sqrt {d} e \mathrm {sgn}\left (b x + a\right ) + 4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )} a c^{2} d \mathrm {sgn}\left (b x + a\right ) + {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{3} a e^{2} \mathrm {sgn}\left (b x + a\right ) - 4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )} b c^{2} e \mathrm {sgn}\left (b x + a\right ) - 8 \, b c^{3} \sqrt {d} \mathrm {sgn}\left (b x + a\right ) + {\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )} a c e^{2} \mathrm {sgn}\left (b x + a\right )}{4 \, {\left ({\left (\sqrt {d} x - \sqrt {d x^{2} + x e + c}\right )}^{2} - c\right )}^{2} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {{\left (a+b\,x\right )}^2}\,\sqrt {d\,x^2+e\,x+c}}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________